<template>
	<view class="tui-gongge-box">
		<view class="tui-flex">
			<view class="tui-gongge-flled" v-for="(item, index) in list" :key="index">
				<!-- <view class="tui-gongge-title">热销推荐</view> -->
				<image :src="item.image" mode="aspectFill" class="tui-gongge-image"></image>
				<view class="back" :style="{'background':item.background}"></view>
				<view class="tui-gongge-txt" >{{item.title}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				
			}
		}
	}
</script>

<style lang="scss">
	.tui-gongge-box {
		margin: 20rpx 30rpx;
		.tui-gongge-flled {
			width: 47%;
			height: 210rpx;
			margin-right: 6%;
			margin-bottom: 6%;
			border-radius: 15rpx;
			position: relative;
			.tui-gongge-image {
				width: 100%;
				height: 100%;
				border-radius: 15rpx;
			}
			.back {
				width: 100%;
				height: 100%;
				position: absolute;
				top: 0;
				left: 0;
				border-radius: 15rpx;
			}
			.tui-gongge-txt {
				font-size: $uni-font-size-lg;
				position: absolute;
				top: 35%;
				left: 16%;
				color: #fff;
				font-size: 36rpx;
				display: flex;
				align-items: center;
				&::after,&::before {
					content: '';
					display: block;
					width: 24rpx;
					height: 5rpx;
					background-color: #fff;
				}
				&::after {
					margin-left: 15rpx;
				}
				&::before {
					margin-right: 15rpx;
				}
			}
			&:nth-child(2n) {
				margin-right: 0;
			}
		}
	}
</style>
